#include <stdio.h>

void change(char *p,char *q,int n)
{
	int i;
	for(i=0;i<n;i++)
		p++;
	while(*q != '\0')
	{
		*p = *q;
		p++;
		q++;
	}
	p++;
	*p = '\0';
}

int main()
{
	char a[20],b[20];
	int m;
	scanf("%s",a);
	scanf("%s",b);
	printf("enter the m:");
	scanf("%d",&m);
	change(a,b,m);
	printf("after change:%s\n",a);
	return 0;
}

